package com.leo.encryptiondemo;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Base64;
import android.util.Log;

public class BaseActivity extends AppCompatActivity {

    private String data="前进吧  小乌龟";
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main2);
        byte[] encode = Base64.encode(data.getBytes(), Base64.DEFAULT);
        Log.d("flag", "----------->得到的数据为onCreate:编码后" +new String(encode));
        byte[] decode = Base64.decode("5aSn5aSn".getBytes(), Base64.DEFAULT);
        Log.d("flag", "----------->得到的数据为onCreate:解码后" +new String(decode));
    }
}
